home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10699 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  700 b 

  1. From: RMarlowe@msn.com (Roger Marlowe)
  2. Subject: Nested templates in MSVC 4?
  3. Date: 9 Mar 96 16:30:09 -0800
  4. Message-ID: <00001a81+0000abe7@msn.com>
  5. Path: news.msn.com!msn.com
  6. Newsgroups: comp.lang.c++
  7. Organization: The Microsoft Network (msn.com)
  8.  
  9. This doesn't seem to work in MSVC++ 4.0. 
  10.  
  11. template <class    T>
  12. class generic_type
  13. {
  14.     T data;
  15. };
  16.  
  17. template <class T> 
  18. class array
  19. {
  20.     T* ptr;
  21.     int length;
  22. };
  23.  
  24. int main()
  25. {
  26.     array<generic_type<int>> arr;
  27.     return 0;
  28. }
  29.  
  30. Perhaps there's a software switch somewhere that I need to throw for 
  31. ANSII compatability or something??
  32.  
  33. Do any MSVC++-O-philes know if I am doing somthing wrong...
  34. or has Microsoft left nested templates out of their pretty, new package??
  35.